import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'virtual:svg-icons-register'
import 'element-plus/dist/index.css'
import './styles/index.scss'
// @ts-ignore
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import SvgIcon from './components/SvgIcon/index.vue'
import globalComponents from './components'
import pinia from './store'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './permission'


const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(pinia)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(router)
app.use(globalComponents)
app.component('SvgIcon', SvgIcon)
app.mount('#app')
